package com.yc.testparm;

import java.util.Scanner;

public class fibonacci {
	
	public static int k = 0;
	
	public static long fibonacci(long m) {
		
		if (m ==0 || m == 1) {
			k++;
			return m;
		} else {
			return fibonacci(m-1) + fibonacci(m-2);
		}
		
	}

	public static void main(String[] args) {
		Scanner  cin = new Scanner(System.in);
		long a = cin.nextLong();
		System.out.println(fibonacci(a));
		System.out.println("总共调用了" + k + "次");
		
	}

}
